package com.survey.service.impl;

import com.survey.dao.mapper.ConfigMapper;
import com.survey.pojo.data.ConfigDO;
import com.survey.service.ConfigService;
import com.survey.utils.Result;
import com.survey.pojo.vo.ConfigVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/** 
 * <br/>
 * Created by survey on 2018/08/03
 */
@Service("configService")
public class ConfigServiceImpl implements ConfigService {

	private final static Logger LOG = LoggerFactory.getLogger(ConfigServiceImpl.class);

	@Resource
	private ConfigMapper configMapper;

	@Override
	public Result addConfig(ConfigVO configVO) throws Exception {
        Integer integer = configMapper.addConfig(configVO);
        if(integer>0){
            return new Result(200,"添加成功");
        }
        return null;
	}

	@Override
	public Result updateConfig(ConfigVO configVO) throws Exception {
		Integer integer = configMapper.updateConfig(configVO);
		if(integer>0){
			return new Result(200,"添加成功");
		}
		return null;
	}
	
	@Override
	public Result findDetailConfig(ConfigVO configVO) throws Exception{
		return null;
	}

	@Override
	public List<ConfigDO> listConfig(ConfigVO configVO) throws Exception{
		return configMapper.listConfig(configVO);
	}
	
	@Override
	public Result listConfigPage(ConfigVO configVO) throws Exception{
		return null;
	}
	
	@Override
	public Result countConfig(ConfigVO configVO) throws Exception{
		return null;
	}
	
	@Override
	public Result deleteConfig(ConfigVO configVO) throws Exception{
		return null;
	}

}